#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <assert.h>

void* my_memset(void* ptr, int value, size_t num)
{
	assert(ptr);
	void* ret = ptr;
	while (num--)
	{
		*(char*)ptr = value;
		ptr = (char*)ptr + 1;
	}
	return ret;
}

int main()
{
	int arr1[] = { 1,2,3,4,5 };
	my_memset(arr1, 'a', 9);
	return 0;
}